package com.jaks.xpense.data.entities;

public class ExpenseCategory {

	private long expenseId;
	private String name;
	private double amount;
	private String ids;

	private static final String NameDivider = " : ";
	private static final String IdDivider = ", ";

	public ExpenseCategory(long expenseId, String name, double amount) {
		this.expenseId = expenseId;
		this.name = name;
		this.amount = amount;
		this.ids = String.valueOf(expenseId);
	}

	public long getExpenseId() {
		return expenseId;
	}

	public void setExpenseId(long expenseId) {
		this.expenseId = expenseId;
		this.ids = String.valueOf(expenseId);
	}

	public String getIds() {
		return ids;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public void appendName(String newName) {
		name = name + NameDivider + newName;
	}

	public void appendAmount(long expenseId, double newAmount) {
		ids = ids + IdDivider + expenseId;
		amount = amount + newAmount;
	}
}
